Skip to content

add an extension point to TopNav#813

Closed
parmentelat wants to merge 2 commits intojupyter-book:mainfrom
flotpython:topnav-navactions
Closed

add an extension point to TopNav#813
parmentelat wants to merge 2 commits intojupyter-book:mainfrom
flotpython:topnav-navactions

Conversation

@parmentelat
Copy link
Copy Markdown
Contributor

for easing additions in the topnav area

Copilot AI review requested due to automatic review settings February 25, 2026 14:34
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 25, 2026

🦋 Changeset detected

Latest commit: f332b59

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@myst-theme/site Patch
@myst-theme/providers Patch
@myst-theme/frontmatter Patch
@myst-theme/diagrams Patch
@myst-theme/jupyter Patch
@myst-theme/styles Patch
@myst-theme/common Patch
@myst-theme/icons Patch
@myst-theme/search Patch
@myst-theme/search-minisearch Patch
@myst-theme/landing-pages Patch
@myst-theme/book Patch
@myst-theme/article Patch
myst-to-react Patch
myst-demo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 25, 2026

Deploy Preview for myst-theme ready!

Name Link
🔨 Latest commit f332b59
🔍 Latest deploy log https://app.netlify.com/projects/myst-theme/deploys/699f09cb6b4c200008cb0f61
😎 Deploy Preview https://deploy-preview-813--myst-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a small extension point to the site’s TopNav component to make it easier for callers to inject additional UI into the top navigation bar without modifying the core component.

Changes:

  • Extends TopNav props with an optional navActions slot (React.ReactNode).
  • Renders navActions in the right-side action area of the top navigation (between Search and ThemeButton).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@choldgraf
Copy link
Copy Markdown
Contributor

I've got a PR that roughly does this as well over here:

@parmentelat
Copy link
Copy Markdown
Contributor Author

Hey @choldgraf
sorry that I had missed yours
btw I had taken a look in PR triage (experimental) (view) and it does not seem to show up?

anyways...

disclaimer: I'm really at the edge of my comfort zone here :)

it looks like both approaches serve different purposes
iiuc your PR is about letting a user to add static stuff - that's great btw

however here we're more after a way to extend the navbar programatically;
initially the reason I came up with this PR is: I have custom theme that adds a 'fullscreen' button, but this means forking/rebasing etc. and it's a bit of a hassle...
so with this reactnode extension my hope is I can simply npm install the theme and extend it programatically; I believe I couldn't achieve this result with your PR, could I ?

but again, not an expert here :)

@parmentelat
Copy link
Copy Markdown
Contributor Author

I'd like to thank @choldgraf for having put together this example
https://chrisholdgraf.com/myst-fullscreen/
that demonstrates how to leverage #802 to achieve something similar

closing this one then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants